package cn.net.trimmer.servlet.demo1.service.impl;

import cn.net.trimmer.servlet.demo1.dao.UserDao;
import cn.net.trimmer.servlet.demo1.entity.User;
import cn.net.trimmer.servlet.demo1.service.UserService;
import cn.net.trimmer.servlet.demo1.util.Factory;

public class UserServiceImpl implements UserService {
	private Factory<UserDao> fa = new Factory<>();
	private UserDao dao = fa.createBean("userDao");

	@Override
	public User login(String username, String password) {
		return dao.queryByUsernameAndPassword(username, password);		
	}

}
